package cn.alm.serviceorder.exceptionhandler;

import cn.alm.serviceorder.common.CR;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(Throwable.class)
    public String handleException(Throwable throwable) {
//        CR cr = new CR();
//        cr.setCode(500);
//        cr.setMessage(throwable.getMessage());
//        return cr;
        return "全局异常处理";
    }

}
